from django.contrib import admin
from .models import SmartLocks, DefectiveStore, DefectiveStoreLocks, DefectiveStoreOutRecord, DefectiveStoreInRecord
# Register your models here.


@admin.register(SmartLocks)
class SmartLocksAdmin(admin.ModelAdmin):
    list_display = ('name',)
    fields = ('name',)
    list_per_page = 20


@admin.register(DefectiveStore)
class DefectiveStoreAdmin(admin.ModelAdmin):
    list_display = ('name',)
    fields = ('name',)
    list_per_page = 20


@admin.register(DefectiveStoreLocks)
class DefectiveStoreLocksAdmin(admin.ModelAdmin):
    list_display = ('smart_locks', 'defective_store', 'quantity')
    fields = ('smart_locks', 'defective_store', 'quantity')
    list_per_page = 20


@admin.register(DefectiveStoreOutRecord)
class DefectiveStoreOutRecordAdmin(admin.ModelAdmin):
    list_display = ('defective_store_locks', 'quantity', 'operator')
    fields = ('defective_store_locks', 'quantity', 'operator')
    list_per_page = 20


@admin.register(DefectiveStoreInRecord)
class DefectiveStoreInRecordAdmin(admin.ModelAdmin):
    list_display = ('defective_store_locks', 'quantity', 'operator')
    fields = ('defective_store_locks', 'quantity','operator')
    list_per_page = 20